package org.siqisource.webstart.base;

import java.util.List;

import org.apache.ibatis.session.RowBounds;
import org.siqisource.webstart.core.utils.condition.Condition;

public abstract class WebstartService<R> {
	
	
	public abstract WebstartMapper<R> getMapper();

	public void insert(R record) {
		getMapper().insert(record);
	}

	public void delete(Integer... id) {
		getMapper().delete(id);
	}

	public void deleteBatch(Condition condition) {
		getMapper().deleteBatch(condition);
	}

	public void update(R record) {
		getMapper().update(record);
	}

	public void updateSelective(R record) {
		getMapper().updateSelective(record);
	}

	public void updateBatchSelective(Condition condition, R record) {
		getMapper().updateBatchSelective(condition, record);
	}

	public R read(Integer... id) {
		return getMapper().read(id);
	}

	public int count(Condition condition) {
		return getMapper().count(condition);
	}

	public List<R> listPage(Condition condition, RowBounds rowBounds) {
		return getMapper().listPage(condition, rowBounds);
	}

	public List<R> list(Condition condition) {
		return getMapper().list(condition);
	}

}
